From 47886a8bd59490095c5768bb7583a20fffd013a8 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 18 Jan 2015 18:36:17 -0800 Subject: [PATCH] Update build script docs for rustc changes Closes #1185 --- src/doc/build-script.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/build-script.md b/src/doc/build-script.md index be6bde6d8..80eaaa353 100644 --- a/src/doc/build-script.md +++ b/src/doc/build-script.md @@ -77,7 +77,7 @@ are interpreted by Cargo and must be of the form `key=value`. Example output: ```notrust -cargo:rustc-flags=-l foo:static -L /path/to/foo +cargo:rustc-flags=-l static=foo -L native=/path/to/foo cargo:root=/path/to/foo cargo:libdir=/path/to/foo/lib cargo:include=/path/to/foo/include @@ -309,7 +309,7 @@ fn main() { .cwd(&Path::new(&out_dir)) .status().unwrap(); - println!("cargo:rustc-flags=-L {} -l hello:static", out_dir); + println!("cargo:rustc-flags=-L native={} -l static=hello", out_dir); } ``` @@ -317,7 +317,7 @@ This build script starts out by compiling out C file into an object file (by invoking `gcc`) and then converting this object file into a static library (by invoking `ar`). The final step is feedback to Cargo itself to say that our output was in `out_dir` and the compiler should link the crate to `libhello.a` -statically via the `-l hello:static` flag. +statically via the `-l static=hello` flag. Note that there are a number of drawbacks to this hardcoded approach: -- 2.30.2